Function.prototype.after = function (afterfn) {
    var __self = this;
    return function () {
        console.log('self:', __self);
        console.log('this:', this);
        var ret = __self.apply(this, arguments); afterfn.apply(this, arguments);
        return ret;
    }
};
window.onload = (window.onload || function () { }).after(function () {
    console.log(document.getElementsByTagName('*').length);
});